import java.io.*;
import java.util.*;
import java.io.BufferedReader;  
import java.io.FileReader;  
import java.util.ArrayList;  
import java.util.Map;
import java.util.List;  
import java.util.Map.Entry;  
import java.util.TreeMap;  
public class wtf{
	public static void main(String args[])throws Exception{
		BufferedReader file = new BufferedReader(new FileReader("D:\\javas\\a.txt"));
		List<String> s =new ArrayList<String>();
		String s1 = null;
		while((s1 = file.readLine()) != null){
			String [] s2 = s1.split("[[^a-zA-Z]]");
			for(String s3 : s2){
				if(s3.length() != 0){
					s.add(s3);
				}
			}
		}
		file.close();
		Map<String, Integer> TreeMap = new TreeMap<String,Integer>();
		for(String s4:s){
			if(TreeMap.get(s4) != null){  
			TreeMap.put(s4,TreeMap.get(s4)+1);
			}
			else{  
                TreeMap.put(s4,1);  
            }
		}
		
		showmap(TreeMap);
		
	}
	public static void showmap(Map<String,Integer> oldmap){  
          
        ArrayList<Map.Entry<String,Integer>> map = new ArrayList<Map.Entry<String,Integer>>(oldmap.entrySet());  
          
        Collections.sort(map,new Comparator<Map.Entry<String,Integer>>(){  

            public int compare(Entry<String, Integer> o1, Entry<String, Integer> o2) {  
                return o2.getValue() - o1.getValue();   
            }  
        });  
          
        for(int i = 0; i<map.size(); i++){  
            System.out.println(map.get(i).getKey()+ ": " +map.get(i).getValue());  
        }     
    }  
  
} 